Streamflow#

Below you will graphs, maps, and images describing streamflow conditions in the water supply areas during the 2023-24 winter season.

# Import dataset
cap_hourly = pd.read_csv('data/cap_lakehead_hourly.csv', parse_dates=['datetime']) 
cap_hourly.head()
datetime flow return_2 return_5
0 2023-01-01 00:00:00 28.5 358 468
1 2023-01-01 01:00:00 27.6 358 468
2 2023-01-01 02:00:00 26.7 358 468
3 2023-01-01 03:00:00 25.9 358 468
4 2023-01-01 04:00:00 25.2 358 468
alt.data_transformers.disable_max_rows()

cap_hour_2023 = alt.Chart(cap_hourly).mark_line(color= "darkblue", size= 2, interpolate='basis').encode(
    alt.X('monthdate(datetime):T', title=None),
    alt.Y('flow:Q', title='Inflow (m^3/s)', scale=alt.Scale(domain=[0, 500])),
    tooltip=["datetime:T", "flow"],
)

return_2 = alt.Chart(cap_hourly).mark_line(color='darkgreen', opacity=0.6, strokeDash=[4, 2], size= 1).encode(
    alt.X('monthdate(datetime):T', title=None),
    alt.Y('return_2:Q', title='Inflow (m^3/s)')
)
return_5 = alt.Chart(cap_hourly).mark_line(color='darkred', opacity=0.6, strokeDash=[4, 2], size= 1).encode(
    alt.X('monthdate(datetime):T', title=None),
    alt.Y('return_5:Q', title='Inflow (m^3/s)')
)
total_hourly = cap_hour_2023 + return_2 + return_5.properties(width=600)
total_hourly

Mean Daily Inflows#

Realtime Inflow Data

You can find realtime inflow data for Capilano River above Lakehead on the Water Survey Canada Hydrometric Data website

Realtime Inflow Data

You can find realtime inflow data for Seymour River above Lakehead on the Water Survey Canada Hydrometric Data website

#qd_monthly['date'] = pd.to_datetime(qd_monthly[['year', 'month']].assign(day=1))
cap_monthly_mean['mean_flow'] = cap_monthly_mean.groupby('month')['flow'].transform('mean').round(1)
cap_monthly_mean['percent'] = cap_monthly_mean['flow']/cap_monthly_mean['mean_flow'].round(1)
cap_monthly_mean.head()
date flow year month mean_flow percent
0 1998-01-31 34.439032 1998 1.0 28.9 1.191662
1 1998-02-28 32.126071 1998 2.0 15.7 2.046247
2 1998-03-31 18.635484 1998 3.0 20.9 0.891650
3 1998-04-30 11.063333 1998 4.0 22.4 0.493899
4 1998-05-31 24.777419 1998 5.0 27.1 0.914296

Monthly Average Inflows and Statistics#

# Create a chart for 'TA_Anomaly'
flow_anomaly_chart = alt.Chart(yr_2023).mark_bar(color='darkgreen').encode(
    x=alt.X('percent:Q', title=None, axis=alt.Axis(format='%')),
    y=alt.Y('monthdate(date):O', title=None, axis=alt.Axis(format='%b')),
    tooltip=[alt.Tooltip('date', title='Date'), alt.Tooltip('percent', title='Percent')]
).properties(
    title = 'Percent of Normal',width=100, height=250
)

rule1 = alt.Chart(pd.DataFrame({
  'percent': ['1'],
  'color': ['gray']
})).mark_rule(opacity=0.8, strokeDash=[3,3]).encode(
  x='percent:Q',
  color=alt.Color('color:N', scale=None)
)

text_percent = flow_anomaly_chart.mark_text(
    align='left',
    baseline='middle',
    size=10,
    dx=3  # Nudges text to right so it doesn't appear on top of the bar
).encode(
    text=alt.Text('percent:Q', format='.0%'),  # Format as percentage
)
anomaly_text = flow_anomaly_chart + text_percent

anomaly = anomaly_text + rule1
month_flow = cap_plots | anomaly
month_flow

Note

Backwatering occurs at the Seymour Lakehead site in the spring (May and June) when the reservoir is full. This causes elevated water levels and inaccurate inflow readings.

Cumulative River Inflows#